package com.sand.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "contractperform", schema = "ssh_pro", catalog = "")
public class ContractperformEntity {
    /**
     * @author <achao1441470436@gmail.com>
     * @since 2021/11/28/028 14:46
     */
    private int rid;
    private int contractId;
    private int phase;
    private Long amount;
    private int status;
    private Timestamp rentPaymentDate;
    private Timestamp payTime;
    private String payMethod;
    private String remark;

    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "contractId")
    public int getContractId() {
        return contractId;
    }

    public void setContractId(int contractId) {
        this.contractId = contractId;
    }

    @Basic
    @Column(name = "phase")
    public int getPhase() {
        return phase;
    }

    public void setPhase(int phase) {
        this.phase = phase;
    }

    @Basic
    @Column(name = "amount")
    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Basic
    @Column(name = "rentPaymentDate")
    public Timestamp getRentPaymentDate() {
        return rentPaymentDate;
    }

    public void setRentPaymentDate(Timestamp rentPaymentDate) {
        this.rentPaymentDate = rentPaymentDate;
    }

    @Basic
    @Column(name = "payTime")
    public Timestamp getPayTime() {
        return payTime;
    }

    public void setPayTime(Timestamp payTime) {
        this.payTime = payTime;
    }

    @Basic
    @Column(name = "payMethod")
    public String getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(String payMethod) {
        this.payMethod = payMethod;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ContractperformEntity that = (ContractperformEntity) o;
        return rid == that.rid && contractId == that.contractId && phase == that.phase && status == that.status && Objects.equals(amount, that.amount) && Objects.equals(rentPaymentDate, that.rentPaymentDate) && Objects.equals(payTime, that.payTime) && Objects.equals(payMethod, that.payMethod) && Objects.equals(remark, that.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, contractId, phase, amount, status, rentPaymentDate, payTime, payMethod, remark);
    }
}
